package com.songlanyun.modules.studyingType.controller.api;

import cn.hutool.core.util.ObjectUtil;
import com.songlanyun.common.exception.RRException;
import com.songlanyun.common.utils.R;
import com.songlanyun.common.validator.ValidatorUtils;
import com.songlanyun.modules.account.controller.common.AbstractApiController;
import com.songlanyun.modules.studyingType.entity.StudyingType;
import com.songlanyun.modules.studyingType.service.StudyingTypeService;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/api/studyingtype")
public class ApiStudyingTypeController extends AbstractApiController {

    @Autowired
    private StudyingTypeService studyingTypeService;


    //小程序学习一级分类下拉框
    @GetMapping("/getFirstSelect")
    public R getAllStudy() {
        return R.ok().put("data", studyingTypeService.loadByParentId(0L));
    }

}
